//
//  LSLTableViewCell.m
//  LSL_IJKPlayer
//
//  Created by 大龙 on 18/1/8.
//  Copyright © 2018年 LSL. All rights reserved.
//

#import "LSLTableViewCell.h"

@implementation LSLTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self initSubViews];
        
        //  [self initSubViews];
        
    }
    return self;
}

- (void)initSubViews{
    
//    self.backgroundColor = [UIColor redColor];
    self.playBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [self addSubview:self.playBtn];
    [self.playBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.mas_centerX);
        make.centerY.equalTo(self.mas_centerY);
        make.size.mas_equalTo(CGSizeMake(100, 50));

    }];
    [self.playBtn addTarget:self action:@selector(play:) forControlEvents:UIControlEventTouchUpInside];
    self.playBtn.backgroundColor = [UIColor cyanColor];

    
}

- (void)play:(UIButton *)btn{
    if (self.playBlock) {
        self.playBlock();
    }
}

@end
